You can read 'raw' image data if you provide it with an associated descriptive text file, give it a .RAW file extension, and then open that.
Note: Only grayscale, RGB and YCbCr images with at least 8 bits/component/pixel are supported.
Note: The text file must be saved using either the Windows 1252 code page (extended ISO 8859-1), or as UTF-8 encoded Unicode.
The .RAW image description file must follow the following format:
RawImage {
width <number>;
// Image width in pixels (required)height <number>;
// Image height in pixels (required)file <string>;
// Global data file (default: same as .raw file but w.o. extension) // First component:<N> {
// N is a character can be one ofR
,G
,B
,I
,A
,Y
,Cb
,Cr
file <string>;
// Component data file name (default: same as global data)start <number>;
// File offset (in bytes) to first pixel of this comp (default:0
)delta <number>;
// Offset between two pixels in bytes (default:1
)}
// More components follow here...}
RawImage {
// A raw interleaved component RGB image:
width 1024;
height 512;
file "my rgb-file";
R {
start 0;
delta 3;
}
G {
start 1;
delta 3;
}
B {
start 2;
delta 3;
}
}
RawImage {
// A raw RGBA image with components in different files:width 256; height 256; R { file "separated.red"; } G { file "separated.green"; } B { file "separated.blue"; } A { file "separated.alpha"; } }
RawImage {
// A raw grayscale image:width 200; height 50; file "foo FOO.bar"; I { } }